package fourzerofour.yangqiang.day01;

import java.util.Scanner;

public class Question3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入连乘的最大数是：");
        int n = scanner.nextInt();
        int sum = 1;
        for (int i = 1; i <= n; i++) {
            sum = sum * i;
        }
        String str = "1";
        for (int i = 1; i <= n-1; i++) {
            str = str + "*" + (i+1);
        }
        str += "的结果为" + sum;
        System.out.println(str);

    }
}

